/*
 * @Description: 规章制度管理接口
 * @Author: Huang Junjie
 * @Date: 2021-04-25 18:36:26
 * @LastEditTime: 2021-06-16 14:37:56
 * @LastEditors: Huang Junjie
 */
import request from '@/utils/request';

// 查询规章制度信息列表（不需要登录）
export function getRuleRegulationDataList(params) {
  return request({
    url: `/jjxt/rules/pageViewData`,
    method: 'get',
    params
  });
}

// 批量删除规章制度信息
export function deleteRuleRegulationData(data) {
  return request({
    url: `/jjxt/rules/remove`,
    method: 'delete',
    data
  });
}

// 批量失效规章制度信息
export function invalidRuleRegulationData(data) {
  return request({
    url: `/jjxt/rules/ruleState`,
    method: 'put',
    data
  });
}

// 新增/修改规章制度信息
export function addEditRuleRegulationData(data) {
  return request({
    url: `/jjxt/rules/saveOrUpdateData`,
    method: 'post',
    data
  });
}

// 获取规章制度下的上传部门
export function getUploadDeptDataList() {
  return request({
    url: `/jjxtapi/dept/findGdbBelowDeptList`,
    method: 'get'
  });
}

// 获取规章制度下的年份
export function getyearDataList() {
  return request({
    url: `/jjxt/rules/year`,
    method: 'get'
  });
}
